home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / polygo / polypara.frm (.txt) < prev   
Encoding:
Visual Basic Form  |  1995-05-07  |  11.5 KB  |  389 lines

  1. VERSION 2.00
  2. Begin Form PolyParam 
  3.    Caption         =   "PolyGone Options"
  4.    ClientHeight    =   4110
  5.    ClientLeft      =   5340
  6.    ClientTop       =   2910
  7.    ClientWidth     =   4080
  8.    FontBold        =   -1  'True
  9.    FontItalic      =   0   'False
  10.    FontName        =   "Arial"
  11.    FontSize        =   8.25
  12.    FontStrikethru  =   0   'False
  13.    FontUnderline   =   0   'False
  14.    Height          =   4800
  15.    Left            =   5280
  16.    LinkTopic       =   "Form1"
  17.    ScaleHeight     =   4110
  18.    ScaleWidth      =   4080
  19.    Top             =   2280
  20.    Width           =   4200
  21.    Begin CommandButton cmdDefaults 
  22.       Caption         =   "Defaults"
  23.       Height          =   375
  24.       Left            =   2160
  25.       TabIndex        =   24
  26.       Top             =   3360
  27.       Width           =   855
  28.    End
  29.    Begin CommandButton cmdOK 
  30.       Caption         =   "OK"
  31.       Default         =   -1  'True
  32.       Height          =   375
  33.       Left            =   3240
  34.       TabIndex        =   16
  35.       Top             =   3360
  36.       Width           =   735
  37.    End
  38.    Begin Frame fraDraw 
  39.       Caption         =   "Draw Options"
  40.       Height          =   2775
  41.       Left            =   2160
  42.       TabIndex        =   11
  43.       Top             =   120
  44.       Width           =   1815
  45.       Begin TextBox txtThick 
  46.          Height          =   285
  47.          Left            =   360
  48.          MaxLength       =   2
  49.          TabIndex        =   18
  50.          Text            =   "0"
  51.          Top             =   1920
  52.          Width           =   375
  53.       End
  54.       Begin CheckBox chkInOrder 
  55.          Caption         =   "Draw In-Order"
  56.          Height          =   375
  57.          Left            =   120
  58.          TabIndex        =   17
  59.          Top             =   2280
  60.          Width           =   1575
  61.       End
  62.       Begin TextBox txtDrawSpeed 
  63.          Height          =   285
  64.          Left            =   120
  65.          MaxLength       =   5
  66.          TabIndex        =   13
  67.          Text            =   "0"
  68.          Top             =   1200
  69.          Width           =   735
  70.       End
  71.       Begin TextBox txtDrawDelay 
  72.          Height          =   285
  73.          Left            =   120
  74.          MaxLength       =   5
  75.          TabIndex        =   12
  76.          Text            =   "0"
  77.          Top             =   600
  78.          Width           =   735
  79.       End
  80.       Begin Label lblDrawOpt 
  81.          BackStyle       =   0  'Transparent
  82.          Caption         =   "and less"
  83.          Height          =   255
  84.          Index           =   3
  85.          Left            =   840
  86.          TabIndex        =   22
  87.          Top             =   1920
  88.          Width           =   855
  89.       End
  90.       Begin Label lblDrawOpt 
  91.          BackStyle       =   0  'Transparent
  92.          Caption         =   "Thick lines, order"
  93.          Height          =   255
  94.          Index           =   2
  95.          Left            =   120
  96.          TabIndex        =   19
  97.          Top             =   1680
  98.          Width           =   1575
  99.       End
  100.       Begin Label lblDrawOpt 
  101.          BackStyle       =   0  'Transparent
  102.          Caption         =   "Line Delay"
  103.          Height          =   255
  104.          Index           =   1
  105.          Left            =   120
  106.          TabIndex        =   15
  107.          Top             =   960
  108.          Width           =   975
  109.       End
  110.       Begin Label lblDrawOpt 
  111.          BackStyle       =   0  'Transparent
  112.          Caption         =   "Polygon Delay"
  113.          Height          =   255
  114.          Index           =   0
  115.          Left            =   120
  116.          TabIndex        =   14
  117.          Top             =   360
  118.          Width           =   1335
  119.       End
  120.    End
  121.    Begin Frame fraErase 
  122.       Caption         =   "Erase Options"
  123.       Height          =   3855
  124.       Left            =   120
  125.       TabIndex        =   0
  126.       Top             =   120
  127.       Width           =   1815
  128.       Begin CheckBox chkErase 
  129.          Caption         =   "Sweep"
  130.          Height          =   255
  131.          Index           =   7
  132.          Left            =   120
  133.          TabIndex        =   23
  134.          Top             =   2040
  135.          Width           =   1290
  136.       End
  137.       Begin CheckBox chkSparkle 
  138.          Caption         =   "Flashes"
  139.          Height          =   255
  140.          Left            =   120
  141.          TabIndex        =   21
  142.          Top             =   3480
  143.          Value           =   1  'Checked
  144.          Width           =   1455
  145.       End
  146.       Begin CheckBox chkErase 
  147.          Caption         =   "Zigzag"
  148.          Height          =   255
  149.          Index           =   6
  150.          Left            =   120
  151.          TabIndex        =   20
  152.          Top             =   1800
  153.          Value           =   1  'Checked
  154.          Width           =   1290
  155.       End
  156.       Begin TextBox txtEraseDur 
  157.          Height          =   285
  158.          Index           =   1
  159.          Left            =   1200
  160.          MaxLength       =   2
  161.          TabIndex        =   10
  162.          Text            =   "25"
  163.          Top             =   3000
  164.          Width           =   495
  165.       End
  166.       Begin TextBox txtEraseDur 
  167.          Height          =   285
  168.          Index           =   0
  169.          Left            =   1200
  170.          MaxLength       =   2
  171.          TabIndex        =   7
  172.          Text            =   "10"
  173.          Top             =   2640
  174.          Width           =   495
  175.       End
  176.       Begin CheckBox chkErase 
  177.          Caption         =   "Spiral In"
  178.          Height          =   255
  179.          Index           =   5
  180.          Left            =   120
  181.          TabIndex        =   6
  182.          Top             =   1560
  183.          Value           =   1  'Checked
  184.          Width           =   1290
  185.       End
  186.       Begin CheckBox chkErase 
  187.          Caption         =   "Spiral Out"
  188.          Height          =   255
  189.          Index           =   4
  190.          Left            =   120
  191.          TabIndex        =   5
  192.          Top             =   1320
  193.          Value           =   1  'Checked
  194.          Width           =   1290
  195.       End
  196.       Begin CheckBox chkErase 
  197.          Caption         =   "V Snake"
  198.          Height          =   255
  199.          Index           =   3
  200.          Left            =   120
  201.          TabIndex        =   4
  202.          Top             =   1080
  203.          Value           =   1  'Checked
  204.          Width           =   1290
  205.       End
  206.       Begin CheckBox chkErase 
  207.          Caption         =   "H Snake"
  208.          Height          =   255
  209.          Index           =   2
  210.          Left            =   120
  211.          TabIndex        =   3
  212.          Top             =   840
  213.          Value           =   1  'Checked
  214.          Width           =   1290
  215.       End
  216.       Begin CheckBox chkErase 
  217.          Caption         =   "Random"
  218.          Height          =   255
  219.          Index           =   1
  220.          Left            =   120
  221.          TabIndex        =   2
  222.          Top             =   600
  223.          Value           =   1  'Checked
  224.          Width           =   1290
  225.       End
  226.       Begin CheckBox chkErase 
  227.          Caption         =   "Snap"
  228.          Height          =   255
  229.          Index           =   0
  230.          Left            =   120
  231.          TabIndex        =   1
  232.          Top             =   360
  233.          Width           =   1290
  234.       End
  235.       Begin Line Line1 
  236.          BorderWidth     =   2
  237.          Index           =   0
  238.          X1              =   0
  239.          X2              =   1800
  240.          Y1              =   3360
  241.          Y2              =   3360
  242.       End
  243.       Begin Line Line1 
  244.          BorderWidth     =   2
  245.          Index           =   1
  246.          X1              =   0
  247.          X2              =   1800
  248.          Y1              =   2520
  249.          Y2              =   2520
  250.       End
  251.       Begin Label lblEraseDur 
  252.          Caption         =   "Force after"
  253.          Height          =   285
  254.          Index           =   1
  255.          Left            =   120
  256.          TabIndex        =   9
  257.          Top             =   3000
  258.          Width           =   975
  259.       End
  260.       Begin Label lblEraseDur 
  261.          Caption         =   "Allow after"
  262.          Height          =   285
  263.          Index           =   0
  264.          Left            =   120
  265.          TabIndex        =   8
  266.          Top             =   2640
  267.          Width           =   975
  268.       End
  269.    End
  270.    Begin Menu mnuFile 
  271.       Caption         =   "&File"
  272.       Begin Menu mnuFileLoad 
  273.          Caption         =   "&Load .INI"
  274.       End
  275.       Begin Menu mnuFileSave 
  276.          Caption         =   "&Save .INI"
  277.       End
  278.       Begin Menu mnuFileAbout 
  279.          Caption         =   "&About"
  280.       End
  281.       Begin Menu mnuFileExit 
  282.          Caption         =   "E&xit"
  283.       End
  284.    End
  285.    DefInt A-Z
  286.    Option Explicit
  287. Sub chkErase_Click (index As Integer)
  288.    EraseOptions(index) = (chkErase(index).Value <> 0)
  289. End Sub
  290. Sub chkInOrder_Click ()
  291.    DrawInOrder = -(chkInOrder.Value)
  292.    EraseInit = True
  293. End Sub
  294. Sub chkSparkle_Click ()
  295.    Sparkles = -(chkSparkle.Value)   ' 0 or -1
  296. End Sub
  297. Sub cmdDefaults_Click ()
  298.    DrawDelay = 0        ' wait between polygons
  299.    DrawSpeed = 0        ' wait between lines
  300.    ThickOrder = 6       ' polygon order below which
  301.                         '  lines are thickened
  302.    DrawInOrder = False  ' True to draw CCW always
  303.    Sparkles = True      ' True for leading white eraser
  304.    EraseMinInterval = 12 ' minimum polygons before erase
  305.    EraseMaxInterval = 25 ' maximum    ""       "     "
  306.    EraseOptions(0) = 0  ' snap to black
  307.    EraseOptions(1) = 1  ' random tiles
  308.    EraseOptions(2) = 1  ' H-Snake
  309.    EraseOptions(3) = 1  ' V-Snake
  310.    EraseOptions(4) = 1  ' Spiral out
  311.    EraseOptions(5) = 1  ' Spiral in
  312.    EraseOptions(6) = 1  ' Zigzag walk
  313.    EraseOptions(7) = 0  ' Sweeping polygon
  314.    PolyForm.WindowState = 0
  315.    PolyForm.Top = 150
  316.    PolyForm.Left = 150
  317.    PolyForm.Height = 2250
  318.    PolyForm.Width = 2640
  319.    FillBoxes
  320. End Sub
  321. Sub cmdOK_Click ()
  322.    DoEvents
  323.    DoEvents
  324.    Unload Me
  325. End Sub
  326. Sub FillBoxes ()
  327.    Dim k As Integer
  328.    For k = 0 To UBound(EraseOptions)
  329.       chkErase(k).Value = -(EraseOptions(k) <> 0)
  330.    Next
  331.    txtDrawDelay.Text = DrawDelay
  332.    txtDrawSpeed.Text = DrawSpeed
  333.    txtEraseDur(0).Text = EraseMinInterval
  334.    txtEraseDur(1).Text = EraseMaxInterval
  335.    txtThick.Text = ThickOrder
  336.    chkInOrder.Value = -(DrawInOrder)
  337.    chkSparkle.Value = -(Sparkles <> 0)
  338. End Sub
  339. Sub Form_Activate ()
  340.    FillBoxes
  341. End Sub
  342. Sub mnuFileAbout_Click ()
  343.    PolyAbout.Show 1
  344. End Sub
  345. Sub mnuFileExit_Click ()
  346.    End
  347. End Sub
  348. Sub mnuFileLoad_Click ()
  349.    LoadINI
  350.    FillBoxes
  351. End Sub
  352. Sub mnuFileSave_Click ()
  353.    SaveINI
  354. End Sub
  355. Sub txtDrawDelay_GotFocus ()
  356.    txtDrawDelay.SelStart = 0
  357.    txtDrawDelay.SelLength = 99
  358. End Sub
  359. Sub txtDrawDelay_LostFocus ()
  360.     DrawDelay = txtDrawDelay.Text
  361. End Sub
  362. Sub txtDrawSpeed_GotFocus ()
  363.    txtDrawSpeed.SelStart = 0
  364.    txtDrawSpeed.SelLength = 99
  365. End Sub
  366. Sub txtDrawSpeed_LostFocus ()
  367.     DrawSpeed = txtDrawSpeed.Text
  368. End Sub
  369. Sub txtEraseDur_GotFocus (index As Integer)
  370.    txtEraseDur(index).SelStart = 0
  371.    txtEraseDur(index).SelLength = 2
  372. End Sub
  373. Sub txtEraseDur_LostFocus (index As Integer)
  374.    Dim k As Integer
  375.    k = CInt(txtEraseDur(index).Text)
  376.    If index = 0 Then
  377.       EraseMinInterval = k
  378.    Else
  379.       EraseMaxInterval = k
  380.    End If
  381. End Sub
  382. Sub txtThick_GotFocus ()
  383.    txtThick.SelStart = 0
  384.    txtThick.SelLength = 99
  385. End Sub
  386. Sub txtThick_LostFocus ()
  387.    ThickOrder = txtThick.Text
  388. End Sub
  389.